<template>
  <div id="profile_header">
    <div class="left"><van-image round width="4rem" height="4rem"
                                         :src="'/api/'+imgsrc" fit="cover" v-if="imgsrc"
/>
     <span v-else>

     </span>
    </div>
<!--    <div class="tag"><van-tag round type="primary" color="orange">1级</van-tag></div>-->
    <div class="center"><slot name="center_header"></slot></div>
    <div class="right"><slot name="right_header"></slot></div>
  </div>
</template>

<script>
export default {
name: "profile_header",
  props:{
  imgsrc:''
  }
}
</script>

<style scoped>
#profile_header{
  height: 100px;
  background-color: white;
  display: flex;
  text-align: center;

}
.left{
  width: 100px;
  /*background-color: pink;*/
  margin-top: 18px;
    position: absolute;
}
.right{
  width: 100px;
  /*background-color: skyblue;*/
}
.center{
  flex: 1;
  margin-left: 30px;
}
.tag{
  position: relative;
top: 66px;
left: 67px;
}
</style>